<%-- 
    Document   : create
    Created on : 23.09.2010, 00:04:44
    Author     : Markus Goetz
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="http://nixis.de/jsp/tags/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
    <head>
        <title>Create User</title>
    </head>
    <body>
        <h1>Create a new User Account</h1>
        
        <c:if test="${not empty it.violationMessages}">
            <div class="error" style="color: red; border: solid 1px red;">
                <p>Please correct the following errors before proceding</p>
                <ul>
                    <c:forEach var="violation" items="${it.violationMessages}">
                        <li>${violation}</li>
                    </c:forEach>
                </ul>
            </div>
        </c:if>
        
        <form method="post" class="ajax" action="<u:url value="/user/save" />">
            Username: <input type="text" name="username" value="${it.name}" /><br/>
            Firstname: <input type="text" name="firstname" value="${it.firstName}" /><br/>
            Lastname: <input type="text" name="lastname" value="${it.lastName}" /><br/>
            E-Mail: <input type="text" name="email" value="${it.email}" /><br/>
            Password: <input type="password" name="password" value="${it.unencryptedPassword}" /><br/>
            Password Verification: <input type="password" name="verification" value="${it.unencryptedPasswordVerification}" />
            <input type="submit" value="submit"/><br/>
        </form>
    </body>
</html>